<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>login</title>
  <link rel="stylesheet" href="./css/login.css">
</head>

<body>
  <form action="index.html" class="login-form">
    <h1>Log In</h1>

    <div class="txtb">
      <input type="text" value="">
      <span data-placeholder="Username"></span>
    </div>

    <div class="txtb">
      <input type="password">
      <span data-placeholder="Password"></span>
    </div>

    <input type="submit" class="logbtn" value="Log In">

    <div class="bottom-text">
      Don't have account?
      <a href="#">Sign up</a>
    </div>

  </form>


  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script>
    $(".txtb input").on("focus", function () {
      $(this).addClass("focus");
    });

    $(".txtb input").on("blur", function () {
      if ($(this).val() == "")
        $(this).removeClass("focus");
    });
  </script>
</body>

</html>